package com.atguigu.composite;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 叶子节点：院系
 * @create: 2022-02-19 15:26
 **/
public class Department extends OrganizationComponent{

    public Department(String name, String des) {
        super(name, des);
    }

    /**
     * 叶子节点，所以 add 和remove方法不用再重写
     */
    @Override
    protected void print() {
        System.out.println(getName());
    }

    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public String getDes() {
        return super.getDes();
    }
}
